home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / winsock / ircii2-6.zip / SRC\IRCII-2.6\SCRIPT\TRACES < prev    next >
Text File  |  1994-12-28  |  2KB  |  74 lines

  1. #  /Trace replacement - Eric Prestemon (ecp2z@virginia.edu, Mar 23, 1992)
  2. #  Some simple aliases and on's to implement a single-line trace
  3. #  Lost is the timing of net delays, but also lost is the wasted
  4. #  space...just load these up at run time, and /trace'ing will
  5. #  never be the same.
  6. #  Note: Do not launch a new trace until the old one finishes. I don't
  7. #  even know what will happen, I just know it will be wrong. =)
  8.  
  9. # The main alias
  10. alias TRACE ^assign _tn $0;^assign _tt Trace:$left($index(. $S)-1 $S);quote trace $0
  11.  
  12. # Don't want to see that first one...
  13. on ^server_notice *LINK* comment
  14.  
  15. # These 2 stick the first part of each server name on the path onto the
  16. #   end of _tt...(2.7 and 2.6 are handled, respectively)
  17. on ^200 * assign _tt $_tt-$left($index(. $0)-1 $0)
  18. on ^NOTICE "*.* *LINK*" assign _tt $_tt-$left($index(. $3)-1 $3)
  19.  
  20. # The next few lines handle the messages from 2.6* servers
  21. on ^notice "*.* *OPER*" {
  22.     if ( [$6] )
  23.         { assign _tx $6 }
  24.         { assign _tx $5 }
  25.     if ( rmatch($left($index([ $_tx)-1 $_tx) $_tn) == 1 )
  26.         { _trace_parse $0 $_tx * }
  27.         { _trace_servb $* }
  28.     assign -_tx
  29. }
  30.  
  31. on ^notice "*.* *USER*" {
  32.     if ( [$6] )
  33.         { assign _tx $6 }
  34.         { assign _tx $5 }
  35.     if ( rmatch($left($index([ $_tx)-1 $_tx) $_tn) == 1 )
  36.         { _trace_parse $0 $_tx }
  37.         { _trace_servb $* }
  38.     assign -_tx
  39. }
  40. on ^notice "%.% *SERV*" _trace_servb $*
  41. alias _trace_servb {
  42.     if ( rmatch($0 $_tn) == 1 )
  43.         { echo $_tt-$0 }
  44.     assign -_tt
  45.     assign -_tr
  46.     assign _tn qwertyuipoadfg
  47.     echo $1-3 $5-
  48. }
  49.  
  50. # These lines handle 2.7* servers, with their numeric messages
  51. on ^204 * {
  52.     if ( rmatch($left($index([ $3)-1 $3) $_tn) == 1 )
  53.         { _trace_parse $0 $3 * }
  54.         { _trace_serva $* }
  55. }
  56. on ^205 * {
  57.     if ( rmatch($left($index([ $3)-1 $3) $_tn) == 1 )
  58.         { _trace_parse $0 $3 }
  59.         { _trace_serva $* }
  60. }
  61. on ^206 * _trace_serva $*
  62. alias _trace_serva {
  63.     if ( rmatch($0 $_tn) == 1 )
  64.         { echo $_tt-$0 }
  65.     assign -_tt
  66.     assign -_tr
  67.     assign _tn qwertyuiopzxc
  68.     echo *** $1 Class[$2] ==> $3-
  69. }
  70.  
  71. # This is called at the end of the line, if it is a user or operator, to 
  72. #   echo the path, the full name of the final server, and the username.
  73. alias _trace_parse assign _tr -$left($index([ $1)-1 $1);echo $_tt-$0$_tr$2;assign _tn qwertuipzxc;assign -_tr;assign -_tt
  74.